#PROJ = server
#OBJS = leds_hw.o leds.o server.o beep.o beep_hw.o hcsr.o 
SRC       	= $(wildcard *.c)
OBJS      	= $(patsubst %.c, %.o, $(SRC)) 
ROOTFS_PATH 	= /home/tarena/ehome/rootfs/home/bin
CC 	  	= arm-cortex_a9-linux-gnueabi-gcc
RM 	  	= rm -rf
HEAD_PATH 	= ../mp3/install/include
SHARED_PATH	= ../mp3/install/lib/
FLAGS		= -lmad -lasound -lpthread -L$(SHARED_PATH) -I$(HEAD_PATH)
server: $(OBJS)
	$(CC) $(OBJS)  $(FLAGS) -o server
	cp server $(ROOTFS_PATH)
%.o:%.c
	$(CC) -c $< -o $@
clean:
	$(RM) server *.o 
#$(PROJ):$(OBJS)
#	$(CC) $^ -o $@
#	cp $(PROJ) $(FILE_PATH) 
#%o:%c
#	$(CC) -c $^
#clean:
#	$(RM) $(PROJ) $(OBJS) *.gch
